/**
 * Copyright (c) 2013-2016, Jieven. All rights reserved.
 *
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
 * To use it on other terms please contact us at 1623736450@qq.com
 */
package com.eova.core.role;

import com.eova.aop.Aop上下文;
import com.eova.aop.元对象拦截器;

public class RoleIntercept extends 元对象拦截器 {

	@Override
	public String 事务内新增前置任务(Aop上下文 ac) throws Exception {
		Integer lv = ac.当前操作对象.getInt("lv");
		Integer roleLv = ac.当前用户对象.getRole().getInt("lv");
		if (lv <= roleLv) {
			return error("权限级别必须大于：" + roleLv);
		}
		return null;
	}

	@Override
	public String updateBefore(Aop上下文 ac) throws Exception {
		return 事务内新增前置任务(ac);
	}

	

}